package com.yf.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yf.entity.CmsCategory;
import com.yf.mapper.CmsCategoryMapper;
import com.yf.service.CategoryService;

/**
 * 查询所有部门
 * @author yephone
 *
 */
@Service
public class CategoryServiceImpl implements CategoryService {
	
	@Autowired
	private CmsCategoryMapper cmsCategoryMapper;

	@Override
	public List<CmsCategory> selectAll() {
		
		List<CmsCategory> categoryList=cmsCategoryMapper.selectAll();
		return categoryList;
	}

	@Override
	public CmsCategory getCategoryById(Integer id) {
		CmsCategory category=cmsCategoryMapper.selectByPrimaryKey(id);
		return category;
	}

}
